// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.profanity;

import java.util.regex.Matcher;

public class Phonizer {
    private String name;
    private String regex;

    public Phonizer(String _name, String _regex) {
        this.name = _name;
        this.regex = _regex;
    }

    public String getName() {
        return this.name;
    }

    public String getRegex() {
        return this.regex;
    }

    public void execute(Matcher m, StringBuffer s) {
        if (m.group(this.name) != null) {
            m.appendReplacement(s, "${" + this.name + "}");
        }
    }
}
